<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="mvc" uri="http://www.trkj.com/mvc/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
<link type="text/css" rel="stylesheet" href="css/lgoodslist.css"/>
<link rel="stylesheet" href="font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="bootstrap/css/bootstrap-responsive.min.css" />
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js" ></script>
<script type="text/javascript">
	$(function(){
		//单项删除
		$(".brandssort_delete").click(function(){
			if(confirm("真的要删除吗？")){
				var a = $(this);
				$.get("brands?action=deleteSort", {code: a.attr("id")}, function(){
					a.parent().parent().remove();
				});
			}
		});
	});
</script>
</head>
<body style="font-size: 20px;">
	<div class="top" style="padding: 20px 30px 10px; font-size: 16px;">
		<a href="#">商品</a>/
		<a href="#">品牌管理</a>/
		<span>分类列表</span>
	</div>
	<div class="middle">
		<div class="span12" style="width: 96%;">
		<a href="lbrandsaddrevise.jsp">
			<button>
				<i class="fa fa-plus"></i>
				<span>添加分类</span>
			</button>
		</a>
		</div>
	</div>
	<div class="bottom">
		<div class="span12" style="width: 96%;">
			<table class="table">
			<thead>
				<tr>
					<th>序号</th>
					<th>分类名称</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${map.list }" var="u" varStatus="vs">
					<tr style="background-color:#${((param.curpage- 1)* param.pagesize+ vs.count)%2 eq 0?'':'cccccc'}">
						<td>${(param.curpage - 1) * param.pagesize + vs.count}</td>
						<td>${u.c_name}</td>
						<td><a href="brands?action=querysortRevise&code=${u.id}"><i class="fa fa-pencil-square-o"></i></a>
							<a id="${u.id}" class="brandssort_delete" href="javascript:void(0);"><i class="fa fa-times"></i></a></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
			<div class="pager" style="float: left; margin-top: 0px;">
			<mvc:pager url="brands?action=queryByPageSort" pagesize="${param.pagesize}" count="${map.count }" curpage="${param.curpage }" />
		</div>
	</div>
	</div>
</body>
</html>